import './App.less'
import { useEffect } from 'react'
import socket from './../services/ioService'
import VideoContainer from '../Components/VideoContainer'
import MessageContainer from '../Components/MessageContainer'

function App() {
    useEffect(() => {
        const userName = prompt("请输入你的用户名",
            "匿名用户")
        socket.emit('login', userName || '匿名用户')
    }, [])

    return <div className="app">
        <VideoContainer />
        <MessageContainer />
    </div>
}

export default App
